package com.euq.service.Impl;

import com.euq.entity.Task;

import com.euq.mapper.TaskMapper;
import com.euq.service.TaskService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TaskServiceImpl implements TaskService {
    @Autowired
    private TaskMapper taskMapper;
    @Override
    public Object list(String name) {
        if (StringUtils.isEmpty(name)) {
            return taskMapper.listAll();
        } else {
            return taskMapper.listByName(name);
        }
    }

    @Override
    public void add(Task task) {

    }

    @Override
    public void delete(Long id) {

    }

    @Override
    public void disable(Long taskId) {

    }

    @Override
    public void enable(Long taskId) {

    }
}
